<?php

	class connection extends PDO
	{
		private $stgsql;
		
		function __construct($dbname = "LSM_TESTE", $host = "localhost", $user = "root")
		{
			parent::__construct('mysql:host='.$host.';dbname='.$dbname, $user, '', array(PDO::ATTR_PERSISTENT => true));
			$stgsql = null;
		}
		
		function searchPizzas() 
		{
			$this->stgsql = $this->prepare(" select * 
									from PIZZAS 
									order by codigo");  

			$this->stgsql->execute();
		
		}
		
		function getPizzas() 
		{
			return $this->stgsql->fetch();
		}
		
	}

?>